package com.appwoo.txtws.service;

import android.util.Xml;
import com.appwoo.txtws.bean.StateBean;
import com.appwoo.txtws.component.Global;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class UpdateService
{
  public StateBean getUpdateUrl(String paramString)
    throws IOException, XmlPullParserException
  {
    StateBean localStateBean = new StateBean();
    HttpURLConnection localHttpURLConnection = (HttpURLConnection)new URL(Global.SERVICE_URL_UPDATE + paramString).openConnection();
    localHttpURLConnection.setConnectTimeout(2000);
    localHttpURLConnection.setReadTimeout(3000);
    InputStreamReader localInputStreamReader = new InputStreamReader(localHttpURLConnection.getInputStream(), "UTF-8");
    XmlPullParser localXmlPullParser = Xml.newPullParser();
    localXmlPullParser.setInput(localInputStreamReader);
    int i = localXmlPullParser.getEventType();
    if (i == 1)
      return localStateBean;
    switch (i)
    {
    case 1:
    default:
    case 0:
    case 2:
    }
    while (true)
    {
      i = localXmlPullParser.next();
      break;
      localStateBean = new StateBean();
      continue;
      if (localXmlPullParser.getName().equalsIgnoreCase("url"))
        localStateBean.setUrl(localXmlPullParser.nextText());
      else if (localXmlPullParser.getName().equalsIgnoreCase("desc"))
        localStateBean.setDesc(localXmlPullParser.nextText());
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.UpdateService
 * JD-Core Version:    0.6.2
 */